package com.oa.tools;

//import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.system.ApplicationPidFileWriter;
import org.springframework.context.ConfigurableApplicationContext;

import com.oa.tools.listeners.InitListener;
import com.oa.tools.utils.SysConfig;

import tk.mybatis.spring.annotation.MapperScan;

@SpringBootApplication
//@MapperScan({"com.oa.tools"})
@MapperScan(basePackages = { "com.oa.tools.dao" } ,properties= {"ORDER=BEFORE"})
public class OatoolsApplication{
  public static void main(String[] args){
	  
	SpringApplication springApplication = new SpringApplication(OatoolsApplication.class);
	springApplication.addListeners(new InitListener(),new ApplicationPidFileWriter(SysConfig.getSysString("PID_FILE")));
	  
//	ConfigurableApplicationContext context = SpringApplication.run(OatoolsApplication.class, args);
	springApplication.run(args);
  }
}